<?php
	include(ROOTPATH .'include'. DS .'protect.php');
	//include(ROOTPATH .'include'. DS .'initUser.php');
	
	include(ROOTPATH .'class'. DS .'passWord.class.php');
	$pass = new passWord ;
	$id = $encrypt -> recode( getQuery('id') );
	$id = explode(SPLIT_STRING , $id );
	$find_id = (int)$id[0];
	
	if( $id == 0 ){
		exit(infoPage('非法的链接网址','./',3));
	}	
	include "header.php";
?>
<script type="text/javascript" src="<?php echo JS_PATH;?>reSetPassWord.js"></script>

</head>
<body>
	<?php  require('top.php');  ?>

<div class="pos">
	<div class="contents">
    	<?php require('nav.php'); ?>   
        <h2 class="title"><?php echo $navigation -> getList();?></h2>
        <div id="reSetPassWord" class="reSetPassWord">
	<?php
    if( $pass -> isTimeout($find_id) ){
   		echo('<div class="noWorks">此链接的页面已经过期, 请重新申请. <a href="'. urlRewrite('option=forgetPass') .'">点击申请</a>.</div>');
    }elseif( $pass -> isUsed($find_id) ){
		exit('<div class="noWorks">此链接只能使用一次,请重新申请,<a href="'. urlRewrite('option=forgetPass') .'">点击申请</a>.</div>');
	}else{
    ?>
        <form action="<?php echo WEB_ROOT_PATH;?>?option=passWordAction&type=action&do=reSetPassWord" method="post" name="reSetPassWordForm" id="reSetPassWordForm" class="form">
        <ul class="box">
        <li class="highBig"><?php echo '重置密码';?></li>
        <li class="check"><label><?php echo lang_email;?>:</label><input id="userName" name="userName" type="text" class="text" maxlength="100" /></li>
        <li class="check"><label><?php echo lang_password;?>:</label><input id="passWord" name="passWord" type="password" class="text" maxlength="30" /></li>
        <li class="check"><label><?php echo lang_affirm_password;?>:</label><input id="passWord1" name="passWord1" type="password" class="text" maxlength="30" /></li>
        <hr />
        <li class="globalInfo"></li>
        <li><input type="submit" value="<?php echo lang_submit;?>" class="submit" /><input type="hidden" value="<?php echo getQuery('id') ;?>" id="find_id" /></li>
        </ul>
        </form>		
	<?php
    }
    ?>        
        </div><!--#reSetPassWord-->
	</div><!-- .contents-->
</div>

</body>
</html>
